
package com.audi.user.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;


@Entity
@Table(name = "tbl_user_ext")
public class UserExt implements java.io.Serializable{
    
	private static final long serialVersionUID = 5454155825314635342L;
	
	
    /**
     * extId       db_column: ext_id 
     */ 	
	
	private Long extId;
    /**
     * userId       db_column: user_id 
     */ 	
	
	private Long userId;
    /**
     * dealerId       db_column: dealer_id 
     */ 	
	
	private Long dealerId;
    /**
     * contactMobile       db_column: contact_mobile 
     */ 	
	//@Length(max=11)
	private java.lang.String contactMobile;
    /**
     * contactTel       db_column: contact_tel 
     */ 	
	//@Length(max=32)
	private java.lang.String contactTel;
    /**
     * vehicleOwer       db_column: vehicle_ower 
     */ 	
	//@Length(max=128)
	private java.lang.String vehicleOwer;
    /**
     * vin       db_column: vin 
     */ 	
	//@Length(max=128)
	private java.lang.String vin;
    /**
     * ownerStatus       db_column: owner_status 
     */ 	
	
	private Long ownerStatus;
    /**
     * brandId       db_column: brand_id 
     */ 	
	
	private Long brandId;
    /**
     * modelId       db_column: model_id 
     */ 	
	
	private Long modelId;
    /**
     * isBuy       db_column: is_buy 
     */ 	
	
	private Long isBuy;
    /**
     * buyModelId       db_column: buy_model_id 
     */ 	
	
	private Long buyModelId;
    /**
     * buyTime       db_column: buy_time 
     */ 	
	//@Length(max=32)
	private java.lang.String buyTime;
	//columns END


	public UserExt(){
	}

	public UserExt(
		Long extId
	){
		this.extId = extId;
	}

	

	public void setExtId(Long value) {
		this.extId = value;
	}
	
	@Id 
	//@SequenceGenerator(name="user_ext_SEQ",sequenceName="seq_user_ext")
    //@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="user_ext_SEQ") 
	@GenericGenerator(name="custom-id", strategy = "identity")
    @GeneratedValue(generator="custom-id")
	@Column(name = "ext_id", unique = false, nullable = false, insertable = true, updatable = true, length = 22)
	public Long getExtId() {
		return this.extId;
	}
	
	@Column(name = "user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long value) {
		this.userId = value;
	}
	
	@Column(name = "dealer_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getDealerId() {
		return this.dealerId;
	}
	
	public void setDealerId(Long value) {
		this.dealerId = value;
	}
	
	@Column(name = "contact_mobile", unique = false, nullable = true, insertable = true, updatable = true, length = 11)
	public java.lang.String getContactMobile() {
		return this.contactMobile;
	}
	
	public void setContactMobile(java.lang.String value) {
		this.contactMobile = value;
	}
	
	@Column(name = "contact_tel", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getContactTel() {
		return this.contactTel;
	}
	
	public void setContactTel(java.lang.String value) {
		this.contactTel = value;
	}
	
	@Column(name = "vehicle_ower", unique = false, nullable = true, insertable = true, updatable = true, length = 128)
	public java.lang.String getVehicleOwer() {
		return this.vehicleOwer;
	}
	
	public void setVehicleOwer(java.lang.String value) {
		this.vehicleOwer = value;
	}
	
	@Column(name = "vin", unique = false, nullable = true, insertable = true, updatable = true, length = 128)
	public java.lang.String getVin() {
		return this.vin;
	}
	
	public void setVin(java.lang.String value) {
		this.vin = value;
	}
	
	@Column(name = "owner_status", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getOwnerStatus() {
		return this.ownerStatus;
	}
	
	public void setOwnerStatus(Long value) {
		this.ownerStatus = value;
	}
	
	@Column(name = "brand_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getBrandId() {
		return this.brandId;
	}
	
	public void setBrandId(Long value) {
		this.brandId = value;
	}
	
	@Column(name = "model_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getModelId() {
		return this.modelId;
	}
	
	public void setModelId(Long value) {
		this.modelId = value;
	}
	
	@Column(name = "is_buy", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getIsBuy() {
		return this.isBuy;
	}
	
	public void setIsBuy(Long value) {
		this.isBuy = value;
	}
	
	@Column(name = "buy_model_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getBuyModelId() {
		return this.buyModelId;
	}
	
	public void setBuyModelId(Long value) {
		this.buyModelId = value;
	}
	
	@Column(name = "buy_time", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
	public java.lang.String getBuyTime() {
		return this.buyTime;
	}
	
	public void setBuyTime(java.lang.String value) {
		this.buyTime = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ExtId",getExtId())
			.append("UserId",getUserId())
			.append("DealerId",getDealerId())
			.append("ContactMobile",getContactMobile())
			.append("ContactTel",getContactTel())
			.append("VehicleOwer",getVehicleOwer())
			.append("Vin",getVin())
			.append("OwnerStatus",getOwnerStatus())
			.append("BrandId",getBrandId())
			.append("ModelId",getModelId())
			.append("IsBuy",getIsBuy())
			.append("BuyModelId",getBuyModelId())
			.append("BuyTime",getBuyTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getExtId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof UserExt == false) return false;
		if(this == obj) return true;
		UserExt other = (UserExt)obj;
		return new EqualsBuilder()
			.append(getExtId(),other.getExtId())
			.isEquals();
	}
}

